layui.use(['layer'], function(){
    var layer = parent.layer === undefined ? layui.layer : top.layer
        ,$ = layui.jquery;

    $(".mobile_quit_btn").click(function(){
        location.href="/logout";
    });

    $(".reset-photo").click(function(){
        location.href="/resetPhoto";
    });

    $(".download-photo").click(function(){
        var ids = $("#ids").val();
        if(ids==undefined||ids==''){
            return false;
        }
        var downPhotoStu = layer.confirm('需要下载哪些范围的学生照片？', {
            btn: ['打包', '原图', '证件照']
            , btn1:function(){
                top.location.href = "/expOwnStuPhoto?ids="+ids+"&type=all";
                layer.close(downPhotoStu);
            }
            , btn2: function () {
                location.href = "/expOwnStuPhoto?ids="+ids+"&type=original";
            }
            , btn3: function () {
                top.location.href = "/expOwnStuPhoto?ids="+ids+"&type=passport";
            }
        });
    });
});